<?php

namespace app\index\controller;

use app\common\model\User;
use think\Controller;

class Index extends Controller
{
    public function index()
    {
        return view();
    }

    public function register()
    {
        if (request()->isAjax()) {
            $data = input('post.', '', 'trim');
            $res = User::userRegister($data);
            return json($res);
        }
        return view();
    }
}
